package com.permission.param;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

/**
 * Created by Administrator on 2018/4/13
 */
@Data
public class UserParam {

    private static final String userStatusMessage = "用户状态1/0，正常/冻结";

    private Integer userId;

    @Length(min = 6, max = 32, message = "用户名称的长度范围6-32个字符")
    private String username;

    @Length(min = 6, max = 32, message = "用户密码的长度范围6-32个字符")
    private String password;

    @Min(value = 0, message = userStatusMessage)
    @Max(value = 1, message = userStatusMessage)
    private Integer userStatus;

}
